#ifndef _CONFIG_H_
#define _CONFIG_H_
#include "system.h"
#define MAX_AT_CMD_LEN 128
#define MAX_SLAVES_NUM 4

typedef struct _CONFIG_INFO_
{
  char dname[48];
  char serverIP[32];
  char dpsd[48];
  char keepAlive;
  char Qos;
  char did[16];
  uint16_t serverPort;
  char interval;
  char automatic;
  char wifiIp[16];
  char wifiPsd[16];
  char pub_top[16];
  char sub_top[16];
  
} T_CONFIG, *PT_CONFIG;
typedef void(*pReadConfig)(void);
typedef void(*pInConfigMode)(void);
typedef struct{
  pReadConfig PreadConfig;
  pInConfigMode PinConfigMode;
}config_t;
config_t *configCreate(void);
#if ELECT
void readConfig(void);
void inConfigMode(void);
#endif

#endif
